package com.biscuit.page.basicservice.remote.api;

import com.biscuit.common.base.BaseModelResponse;
import com.biscuit.page.basicservice.api.ICommonRemote;
import com.biscuit.common.base.BaseResponse;
import com.biscuit.common.base.BaseResponseVoid;
import com.biscuit.page.basicservice.api.model.request.common.CommonCheckVerifyCodeAReq;
import com.biscuit.page.basicservice.api.model.request.common.CommonGetVerifyCodeAReq;
import com.biscuit.page.basicservice.service.CommonService;
import com.biscuit.page.basicservice.utils.BaseResponseUtil;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author mazihao
 * @createTime 2024/4/18 15:05
 */
@RestController
public class CommonRemoteImpl implements ICommonRemote {

    @Resource
    private CommonService commonService;

    @Override
    public BaseResponse<BaseResponseVoid> getVerifyCode(CommonGetVerifyCodeAReq req) {
        this.commonService.getVerifyCode(req);
        return BaseResponseUtil.success();
    }

    @Override
    public BaseResponse<BaseResponseVoid> checkVerifyCode(CommonCheckVerifyCodeAReq req) {
        this.commonService.checkVerifyCode(req);
        return BaseResponseUtil.success();
    }
}
